import request from '@/utils/request'

//创建推广链接
export function create(data) {
  return request({
    url: `/promotion/link/create`,
    method:'post',
    data:data
  })
}

export function list(data) {
  return request({
    url: `/promotion/link/list`,
    method:'get',
    params:data
  })
}

//明细列表  
export function detlist(data) {
  return request({
    url: `/promotion/detail/list`,
    method:'get',
    params:data
  })
}


//统计数据
export function stats(data) {
  return request({
    url: `/promotion/detail/stats/event`,
    method:'get',
    params:data
  })
}

//统计折线图数据
export function dayStats(data) {
  return request({
    url: `/promotion/detail/stats/trend`,
    method:'get',
    params:data
  })
}

//获取不分页链接列表

export function noPage() {
  return request({
    url: `/promotion/link/noPage`,
    method:'get',
   
  })
}


//用户统计
export function userList(data) {
  return request({
    url: `/promotion/detail/stats/user`,
    method:'get',
   params:data
  })
}


//修改推广链接状态

export function update(data) {
  return request({
    url: `/promotion/link/update`,
    method:'post',
    data:data
  })
}